import ToolRequest from '@/base/newToolAxios';
import RequestOption from '@/base/RequestOption';
import { getActToolUrl } from '@/base/constant';
import { Dayjs } from 'dayjs';
const tr = new ToolRequest();

export default class SubmissionDao {
  /**
   * 根据提交记录id 来插入或者更新评论表中的内容
   *
   * @param assignmentIds  分配记录id列表
   * @param submissionIds  提交记录id列表
   */
  async deleteSubmissions(assignmentIds: Array<number>, submissionIds: Array<number>) {
    const ro = new RequestOption();
    return await tr.post(
      getActToolUrl(),
      {
        action: 'deleteSubmissions',
        assignmentIds: assignmentIds.join(','),
        submissionIds: submissionIds.join(',')
      },
      ro
    );
  }
}
